import request from '@/utils/request'

// 查询教学任务列表
export function listEduTask(query) {
  return request({
    url: '/education/eduTask/list',
    method: 'get',
    params: query
  })
}


// 查询自己的教学任务列表
export function myEduTask(query) {
  return request({
    url: '/education/eduTask/my',
    method: 'get',
    params: query
  })
}

// 查询教学任务详细
export function getEduTask(id) {
  return request({
    url: '/education/eduTask/' + id,
    method: 'get'
  })
}

// 新增教学任务
export function addEduTask(data) {
  return request({
    url: '/education/eduTask',
    method: 'post',
    data: data
  })
}

// 提交教学任务的成绩
export function submitTaskResult(id) {
  return request({
    url: '/education/eduTask/submit/'+id,
    method: 'get'
  })
}

// 修改教学任务
export function updateEduTask(data) {
  return request({
    url: '/education/eduTask',
    method: 'put',
    data: data
  })
}

// 删除教学任务
export function delEduTask(id) {
  return request({
    url: '/education/eduTask/' + id,
    method: 'delete'
  })
}

// 导出教学任务
export function exportEduTask(query) {
  return request({
    url: '/education/eduTask/export',
    method: 'get',
    params: query
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/education/eduTask/importTemplate',
    method: 'get'
  })
}
